import Foundation
typealias FYBuryEventCode = String
let firstOpenApp: FYBuryEventCode = "firstOpenApp"
let openLoginPage: FYBuryEventCode = "openLoginPage"
let loginLoginButtonAction: FYBuryEventCode = "loginLoginButtonAction"
let loginCode: FYBuryEventCode = "loginCode"
let homebuttonclick: FYBuryEventCode = "homebuttonclick"
let autoApply: FYBuryEventCode = "autoApply"
let autoApplyButtonTap: FYBuryEventCode = "autoApplyButtonTap"
let personalinfobutton: FYBuryEventCode = "personalinfobutton"
let fullpersonalinfo: FYBuryEventCode = "fullpersonalinfo"
let workinfobutton: FYBuryEventCode = "workinfobutton"
let fullworkinfo: FYBuryEventCode = "fullworkinfo"
let contactinfobutton: FYBuryEventCode = "contactinfobutton"
let fullcontactinfo: FYBuryEventCode = "fullcontactinfo"
let qusestioninfobutton: FYBuryEventCode = "qusestioninfobutton"
let fullqusestioninfo: FYBuryEventCode = "fullqusestioninfo"
let accountSubmitBtnAct: FYBuryEventCode = "accountSubmitBtnAct"
let accountinfobutton: FYBuryEventCode = "accountinfobutton"
let fullaccountinfo: FYBuryEventCode = "fullaccountinfo"
let livenessStartBtnAction: FYBuryEventCode = "livenessStartBtnAction"
let livenessCameraShow: FYBuryEventCode = "livenessCameraShow"
let livenessCameraTakePhoto: FYBuryEventCode = "livenessCameraTakePhoto"
let livenessCameraAlert: FYBuryEventCode = "livenessCameraAlert"
let livenessCameraAlertSucc: FYBuryEventCode = "livenessCameraAlertSucc"
let livenessCameraAlertFail: FYBuryEventCode = "livenessCameraAlertFail"
let livenessSetCAlert: FYBuryEventCode = "livenessSetCAlert"
let livenessSetCAlertAction: FYBuryEventCode = "livenessSetCAlertAction"
let taxSelected: FYBuryEventCode = "taxSelected"
let taxSelectedCamera: FYBuryEventCode = "taxSelectedCamera"
let taxCameraAlert: FYBuryEventCode = "taxCameraAlert"
let taxCameraAlertSucc: FYBuryEventCode = "taxCameraAlertSucc"
let taxCameraAlertFail: FYBuryEventCode = "taxCameraAlertFail"
let taxCameraSettingAlert: FYBuryEventCode = "taxCameraSettingAlert"
let taxCameraSetAlertAction: FYBuryEventCode = "taxCameraSetAlertAction"
let taxSelectedPhoto: FYBuryEventCode = "taxSelectedPhoto"
let taxPhotoPage: FYBuryEventCode = "taxPhotoPage"
let taxPhotoPageSelImg: FYBuryEventCode = "taxPhotoPageSelImg"
let baseCameraPage: FYBuryEventCode = "baseCameraPage"
let baseCameraPBackA: FYBuryEventCode = "baseCameraPBackA"
let baseCameraTakePhoto: FYBuryEventCode = "baseCameraTakePhoto"
let baseCameraPhotoSure: FYBuryEventCode = "baseCameraPhotoSure"
let baseCameraPhotoAgain: FYBuryEventCode = "baseCameraPhotoAgain"
let idFSelected: FYBuryEventCode = "idFSelected"
let idFSelectedCamera: FYBuryEventCode = "idFSelectedCamera"
let idFCameraAlert: FYBuryEventCode = "idFCameraAlert"
let idFCameraAlertSucc: FYBuryEventCode = "idFCameraAlertSucc"
let idFCameraAlertFail: FYBuryEventCode = "idFCameraAlertFail"
let idFCameraSettingAlert: FYBuryEventCode = "idFCameraSettingAlert"
let idFCameraSetAlertAction: FYBuryEventCode = "idFCameraSetAlertAction"
let idFSelectedPhoto: FYBuryEventCode = "idFSelectedPhoto"
let idFPhotoPage: FYBuryEventCode = "idFPhotoPage"
let idFPhotoPageSelImg: FYBuryEventCode = "idFPhotoPageSelImg"
let idBSelected: FYBuryEventCode = "idBSelected"
let idBSelectedCamera: FYBuryEventCode = "idBSelectedCamera"
let idBCameraAlert: FYBuryEventCode = "idBCameraAlert"
let idBCameraAlertSucc: FYBuryEventCode = "idBCameraAlertSucc"
let idBCameraAlertFail: FYBuryEventCode = "idBCameraAlertFail"
let idBCameraSettingAlert: FYBuryEventCode = "idBCameraSettingAlert"
let idBCameraSetAlertAction: FYBuryEventCode = "idBCameraSetAlertAction"
let idBSelectedPhoto: FYBuryEventCode = "idBSelectedPhoto"
let idBPhotoPage: FYBuryEventCode = "idBPhotoPage"
let idBPhotoPageSelImg: FYBuryEventCode = "idBPhotoPageSelImg"
let productAmountChanged: FYBuryEventCode = "productAmountChanged"
let productAmountAdd: FYBuryEventCode = "productAmountAdd"
let productAmountReduce: FYBuryEventCode = "productAmountReduce"
let productermChanged: FYBuryEventCode = "productermChanged"
let productApplyAction: FYBuryEventCode = "productApplyAction"
let productLocationAlert: FYBuryEventCode = "productLocationAlert"
let productLocationSucc: FYBuryEventCode = "productLocationSucc"
let productLcaAlertFail: FYBuryEventCode = "productLcaAlertFail"
let productLcaSetAlt: FYBuryEventCode = "productLcaSetAlt"
let productLcaSetAltAct: FYBuryEventCode = "productLcaSetAltAct"
let productLcaUpdateSucc: FYBuryEventCode = "productLcaUpdateSucc"
let productLcaUpdateFail: FYBuryEventCode = "productLcaUpdateFail"
let productAddressAlert: FYBuryEventCode = "productAddressAlert"
let productAddressAlertFail: FYBuryEventCode = "productAddressAlertFail"
let productAddressUpdateSucc: FYBuryEventCode = "productAddressUpdateSucc"
let productAddressSetAlt: FYBuryEventCode = "productAddressSetAlt"
let productAddressSetAltAct: FYBuryEventCode = "productAddressSetAltAct"
let H5FileDownloadStart: FYBuryEventCode = "H5FileDownloadStart"
let H5FileDownloadSucc: FYBuryEventCode = "H5FileDownloadSucc"
let H5FileDownloadFail: FYBuryEventCode = "H5FileDownloadFail"
let H5FileDownloadAlertShow: FYBuryEventCode = "H5FileDownloadAlertShow"
let H5FileDownloadAlertUserClose: FYBuryEventCode = "H5FileDownloadAlertUserClose"
let H5FileDownloadAlertAutoClose: FYBuryEventCode = "H5FileDownloadAlertAutoClose"
public extension FYBuryEventCode {
    func buryed(remark: String = "NULL") {
        guard self.isValid() else { return }
        let parameters: Parameters = ["eventCode": self, "eventContent": self, "remark1": remark, "remark2": "NULL", "remark3": "NULL"]
        FYNetwork.request(api: .record, parameters: parameters) { _ in }
    }
}
